home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / misc / demo / hyperxbu.sit / HyperXBug Demo / HyperXBug Demo Stack / cards.xml < prev    next >
Encoding:
Text File  |  1991-08-16  |  24.4 KB  |  615 lines

  1. card_3045.xml
  2. <?xml version="1.0" encoding="utf-8" ?>
  3. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  4. <card>
  5.     <id>3045</id>
  6.     <filler1>0</filler1>
  7.     <bitmap>BMAP_4993.pbm</bitmap>
  8.     <cantDelete> <false /> </cantDelete>
  9.     <showPict> <true /> </showPict>
  10.     <dontSearch> <false /> </dontSearch>
  11.     <owner>2637</owner>
  12.     <link rel="stylesheet" type="text/css" href="stylesheet_3136.css" />
  13.     <part>
  14.         <id>1</id>
  15.         <type>button</type>
  16.         <visible> <true /> </visible>
  17.         <reserved5> 0 </reserved5>
  18.         <reserved4> 0 </reserved4>
  19.         <reserved3> 0 </reserved3>
  20.         <reserved2> 0 </reserved2>
  21.         <reserved1> 0 </reserved1>
  22.         <enabled> <true /> </enabled>
  23.         <rect>
  24.             <left>0</left>
  25.             <top>0</top>
  26.             <right>90</right>
  27.             <bottom>58</bottom>
  28.         </rect>
  29.         <style>transparent</style>
  30.         <showName> <true /> </showName>
  31.         <highlight> <false /> </highlight>
  32.         <autoHighlight> <false /> </autoHighlight>
  33.         <sharedHighlight> <true /> </sharedHighlight>
  34.         <family>0</family>
  35.         <titleWidth>0</titleWidth>
  36.         <icon>6544</icon>
  37.         <textAlign>center</textAlign>
  38.         <font>Chicago</font>
  39.         <textSize>12</textSize>
  40.         <textStyle>plain</textStyle>
  41.         <name>Install HyperXBug</name>
  42.         <script>on mouseUp
  43. answer "Locate HyperCard in the Following Dialog Box"
  44. put "screply" into theApp
  45. put "" into cd fld theApp
  46. do "get installpipe(" & theApp & ")"
  47. if cd fld theApp is "" then
  48. answer "HyperCard Not Found"
  49. exit mouseup
  50. end if
  51. if line 3 of cd fld theApp is not "HyperCard" then
  52. answer "There May Be A Problem, Try Again.  HyperCard Must Be Named 'HyperCard'"
  53. exit mouseup
  54. end if
  55.  
  56. answer "Locate Think C Debugger in the Following Dialog Box"
  57. put "thcreply" into theApp
  58. put "" into cd fld theApp
  59. do "get installpipe(" & theApp & ")"
  60. if cd fld theApp is "" then
  61. answer "THINK C Debugger not Found"
  62. exit mouseup
  63. end if
  64. if line 3 of cd fld theApp is not "Think C Debugger" then
  65. answer "There May Be A Problem, Try Again"
  66. exit mouseup
  67. end if
  68.  
  69. answer "Installation Appears to Be Successful"
  70. end mouseUp</script>
  71.     </part>
  72.     <part>
  73.         <id>2</id>
  74.         <type>button</type>
  75.         <visible> <true /> </visible>
  76.         <reserved5> 0 </reserved5>
  77.         <reserved4> 0 </reserved4>
  78.         <reserved3> 0 </reserved3>
  79.         <reserved2> 0 </reserved2>
  80.         <reserved1> 0 </reserved1>
  81.         <enabled> <true /> </enabled>
  82.         <rect>
  83.             <left>217</left>
  84.             <top>70</top>
  85.             <right>323</right>
  86.             <bottom>120</bottom>
  87.         </rect>
  88.         <style>roundrect</style>
  89.         <showName> <true /> </showName>
  90.         <highlight> <false /> </highlight>
  91.         <autoHighlight> <false /> </autoHighlight>
  92.         <sharedHighlight> <true /> </sharedHighlight>
  93.         <family>0</family>
  94.         <titleWidth>0</titleWidth>
  95.         <icon>26425</icon>
  96.         <textAlign>center</textAlign>
  97.         <font>Chicago</font>
  98.         <textSize>12</textSize>
  99.         <textStyle>plain</textStyle>
  100.         <name>Call XCMD Source</name>
  101.         <script>on mouseUp
  102. put "" into argList
  103. put the number of items in cd fld xcmdargs into numArgs
  104. repeat with argdex = 1 to numArgs
  105. put item argdex of cd fld xcmdargs after argList
  106. if argdex is not numargs then put "," after arglist
  107. end repeat
  108. --Get rid of any carriage returns
  109. repeat while return is in arglist
  110. delete char offset(return,arglist) of arglist
  111. end repeat
  112.  
  113. put "get rescreatepbplus(" & argList & ")" into theCommand
  114. do theCommand
  115. put it into bg fld pipeaddr
  116. -- New way of launching cuz we're not concerned with clipboard
  117. get launchfromfield(line 1 of cd fld thcreply, ┬¼
  118. line 2 of cd fld thcreply, line 3 of cd fld thcreply)
  119.  
  120. set the visible of cd btn "call xcmd source" to false
  121. set the visible of cd btn "make xcmd callback" to false
  122. set the visible of cd btn "go back to c" to false
  123. set the visible of cd btn "get return value from xcmd" to false
  124. end mouseUp
  125. </script>
  126.     </part>
  127.     <part>
  128.         <id>3</id>
  129.         <type>button</type>
  130.         <visible> <false /> </visible>
  131.         <reserved5> 0 </reserved5>
  132.         <reserved4> 0 </reserved4>
  133.         <reserved3> 0 </reserved3>
  134.         <reserved2> 0 </reserved2>
  135.         <reserved1> 0 </reserved1>
  136.         <enabled> <true /> </enabled>
  137.         <rect>
  138.             <left>163</left>
  139.             <top>123</top>
  140.             <right>277</right>
  141.             <bottom>176</bottom>
  142.         </rect>
  143.         <style>roundrect</style>
  144.         <showName> <true /> </showName>
  145.         <highlight> <false /> </highlight>
  146.         <autoHighlight> <true /> </autoHighlight>
  147.         <sharedHighlight> <true /> </sharedHighlight>
  148.         <family>0</family>
  149.         <titleWidth>0</titleWidth>
  150.         <icon>902</icon>
  151.         <textAlign>center</textAlign>
  152.         <font>Chicago</font>
  153.         <textSize>12</textSize>
  154.         <textStyle>plain</textStyle>
  155.         <name>Make XCMD Callback</name>
  156.         <script>on mouseUp
  157. get pbpluscb(bg fld  pipeAddr)
  158. set the visible of cd btn "go back to c" to true
  159. put "Make your Callback again or go back to THINK C."  into cd fld status
  160.  
  161. end mouseUp
  162. </script>
  163.     </part>
  164.     <part>
  165.         <id>4</id>
  166.         <type>button</type>
  167.         <visible> <false /> </visible>
  168.         <reserved5> 0 </reserved5>
  169.         <reserved4> 0 </reserved4>
  170.         <reserved3> 0 </reserved3>
  171.         <reserved2> 0 </reserved2>
  172.         <reserved1> 0 </reserved1>
  173.         <enabled> <true /> </enabled>
  174.         <rect>
  175.             <left>280</left>
  176.             <top>123</top>
  177.             <right>367</right>
  178.             <bottom>176</bottom>
  179.         </rect>
  180.         <style>roundrect</style>
  181.         <showName> <true /> </showName>
  182.         <highlight> <false /> </highlight>
  183.         <autoHighlight> <false /> </autoHighlight>
  184.         <sharedHighlight> <true /> </sharedHighlight>
  185.         <family>0</family>
  186.         <titleWidth>0</titleWidth>
  187.         <icon>26425</icon>
  188.         <textAlign>center</textAlign>
  189.         <font>Chicago</font>
  190.         <textSize>12</textSize>
  191.         <textStyle>plain</textStyle>
  192.         <name>Go Back to C</name>
  193.         <script>on mouseUp
  194. get launchfromfield(line 1 of cd fld thcreply, ┬¼
  195. line 2 of cd fld thcreply, line 3 of cd fld thcreply)
  196. set the visible of me to false
  197. end mouseUp</script>
  198.     </part>
  199.     <part>
  200.         <id>5</id>
  201.         <type>button</type>
  202.         <visible> <false /> </visible>
  203.         <reserved5> 0 </reserved5>
  204.         <reserved4> 0 </reserved4>
  205.         <reserved3> 0 </reserved3>
  206.         <reserved2> 0 </reserved2>
  207.         <reserved1> 0 </reserved1>
  208.         <enabled> <true /> </enabled>
  209.         <rect>
  210.             <left>197</left>
  211.             <top>178</top>
  212.             <right>352</right>
  213.             <bottom>227</bottom>
  214.         </rect>
  215.         <style>roundrect</style>
  216.         <showName> <true /> </showName>
  217.         <highlight> <false /> </highlight>
  218.         <autoHighlight> <false /> </autoHighlight>
  219.         <sharedHighlight> <true /> </sharedHighlight>
  220.         <family>0</family>
  221.         <titleWidth>0</titleWidth>
  222.         <icon>902</icon>
  223.         <textAlign>center</textAlign>
  224.         <font>Chicago</font>
  225.         <textSize>12</textSize>
  226.         <textStyle>plain</textStyle>
  227.         <name>Get Return Value From XCMD</name>
  228.         <script>on mouseUp
  229. get endpbplus(bg fld  pipeAddr)
  230. put it into theRV
  231. answer "Return Value From XCMD is " & theRV
  232. put 0 into bg fld pipeAddr
  233. set the visible of cd btn "call xcmd source" to true
  234. set the visible of cd btn "make xcmd callback" to false
  235. set the visible of cd btn "go back to c" to false
  236. set the visible of cd btn "get return value from xcmd" to false
  237. end mouseUp
  238. </script>
  239.     </part>
  240.     <part>
  241.         <id>7</id>
  242.         <type>field</type>
  243.         <visible> <false /> </visible>
  244.         <dontWrap> <false /> </dontWrap>
  245.         <dontSearch> <false /> </dontSearch>
  246.         <sharedText> <false /> </sharedText>
  247.         <fixedLineHeight> <false /> </fixedLineHeight>
  248.         <autoTab> <false /> </autoTab>
  249.         <lockText> <true /> </lockText>
  250.         <rect>
  251.             <left>280</left>
  252.             <top>240</top>
  253.             <right>428</right>
  254.             <bottom>302</bottom>
  255.         </rect>
  256.         <style>rectangle</style>
  257.         <autoSelect> <false /> </autoSelect>
  258.         <showLines> <false /> </showLines>
  259.         <wideMargins> <false /> </wideMargins>
  260.         <multipleLines> <false /> </multipleLines>
  261.         <reservedFamily> 0 </reservedFamily>
  262.         <titleWidth>0</titleWidth>
  263.         <icon>0</icon>
  264.         <textAlign>left</textAlign>
  265.         <font>Geneva</font>
  266.         <textSize>12</textSize>
  267.         <textStyle>plain</textStyle>
  268.         <textHeight>16</textHeight>
  269.         <name>SCReply</name>
  270.         <script></script>
  271.     </part>
  272.     <part>
  273.         <id>6</id>
  274.         <type>field</type>
  275.         <visible> <false /> </visible>
  276.         <dontWrap> <false /> </dontWrap>
  277.         <dontSearch> <false /> </dontSearch>
  278.         <sharedText> <false /> </sharedText>
  279.         <fixedLineHeight> <false /> </fixedLineHeight>
  280.         <autoTab> <false /> </autoTab>
  281.         <lockText> <true /> </lockText>
  282.         <rect>
  283.             <left>275</left>
  284.             <top>170</top>
  285.             <right>434</right>
  286.             <bottom>238</bottom>
  287.         </rect>
  288.         <style>rectangle</style>
  289.         <autoSelect> <false /> </autoSelect>
  290.         <showLines> <false /> </showLines>
  291.         <wideMargins> <false /> </wideMargins>
  292.         <multipleLines> <false /> </multipleLines>
  293.         <reservedFamily> 0 </reservedFamily>
  294.         <titleWidth>0</titleWidth>
  295.         <icon>0</icon>
  296.         <textAlign>left</textAlign>
  297.         <font>Geneva</font>
  298.         <textSize>12</textSize>
  299.         <textStyle>plain</textStyle>
  300.         <textHeight>16</textHeight>
  301.         <name>ThCReply</name>
  302.         <script></script>
  303.     </part>
  304.     <part>
  305.         <id>9</id>
  306.         <type>field</type>
  307.         <visible> <true /> </visible>
  308.         <dontWrap> <false /> </dontWrap>
  309.         <dontSearch> <false /> </dontSearch>
  310.         <sharedText> <false /> </sharedText>
  311.         <fixedLineHeight> <false /> </fixedLineHeight>
  312.         <autoTab> <false /> </autoTab>
  313.         <lockText> <false /> </lockText>
  314.         <rect>
  315.             <left>175</left>
  316.             <top>20</top>
  317.             <right>401</right>
  318.             <bottom>65</bottom>
  319.         </rect>
  320.         <style>scrolling</style>
  321.         <autoSelect> <false /> </autoSelect>
  322.         <showLines> <false /> </showLines>
  323.         <wideMargins> <false /> </wideMargins>
  324.         <multipleLines> <false /> </multipleLines>
  325.         <reservedFamily> 0 </reservedFamily>
  326.         <titleWidth>0</titleWidth>
  327.         <icon>0</icon>
  328.         <textAlign>left</textAlign>
  329.         <font>Geneva</font>
  330.         <textSize>12</textSize>
  331.         <textStyle>plain</textStyle>
  332.         <textHeight>16</textHeight>
  333.         <name>XCMDArgs</name>
  334.         <script></script>
  335.     </part>
  336.     <part>
  337.         <id>10</id>
  338.         <type>field</type>
  339.         <visible> <true /> </visible>
  340.         <dontWrap> <false /> </dontWrap>
  341.         <dontSearch> <false /> </dontSearch>
  342.         <sharedText> <false /> </sharedText>
  343.         <fixedLineHeight> <false /> </fixedLineHeight>
  344.         <autoTab> <false /> </autoTab>
  345.         <lockText> <false /> </lockText>
  346.         <rect>
  347.             <left>175</left>
  348.             <top>0</top>
  349.             <right>300</right>
  350.             <bottom>21</bottom>
  351.         </rect>
  352.         <style>rectangle</style>
  353.         <autoSelect> <false /> </autoSelect>
  354.         <showLines> <false /> </showLines>
  355.         <wideMargins> <false /> </wideMargins>
  356.         <multipleLines> <false /> </multipleLines>
  357.         <reservedFamily> 0 </reservedFamily>
  358.         <titleWidth>0</titleWidth>
  359.         <icon>0</icon>
  360.         <textAlign>left</textAlign>
  361.         <font>Geneva</font>
  362.         <textSize>12</textSize>
  363.         <textStyle>plain</textStyle>
  364.         <textHeight>16</textHeight>
  365.         <name></name>
  366.         <script></script>
  367.     </part>
  368.     <part>
  369.         <id>14</id>
  370.         <type>button</type>
  371.         <visible> <true /> </visible>
  372.         <reserved5> 0 </reserved5>
  373.         <reserved4> 0 </reserved4>
  374.         <reserved3> 0 </reserved3>
  375.         <reserved2> 0 </reserved2>
  376.         <reserved1> 0 </reserved1>
  377.         <enabled> <true /> </enabled>
  378.         <rect>
  379.             <left>0</left>
  380.             <top>64</top>
  381.             <right>104</right>
  382.             <bottom>119</bottom>
  383.         </rect>
  384.         <style>transparent</style>
  385.         <showName> <true /> </showName>
  386.         <highlight> <false /> </highlight>
  387.         <autoHighlight> <false /> </autoHighlight>
  388.         <sharedHighlight> <true /> </sharedHighlight>
  389.         <family>0</family>
  390.         <titleWidth>0</titleWidth>
  391.         <icon>2</icon>
  392.         <textAlign>center</textAlign>
  393.         <font>Chicago</font>
  394.         <textSize>12</textSize>
  395.         <textStyle>plain</textStyle>
  396.         <name>Reset, If Crash Occurs</name>
  397.         <script>on mouseUp
  398. put 0 into bg fld pipeaddr
  399. set the visible of cd btn "call xcmd source" to true
  400. set the visible of cd btn "make xcmd callback" to true
  401. set the visible of cd btn "go back to c" to true
  402. set the visible of cd btn "get return value from xcmd" to true
  403.  
  404. end mouseUp
  405.  
  406. </script>
  407.     </part>
  408.     <part>
  409.         <id>18</id>
  410.         <type>button</type>
  411.         <visible> <true /> </visible>
  412.         <reserved5> 0 </reserved5>
  413.         <reserved4> 0 </reserved4>
  414.         <reserved3> 0 </reserved3>
  415.         <reserved2> 0 </reserved2>
  416.         <reserved1> 0 </reserved1>
  417.         <enabled> <true /> </enabled>
  418.         <rect>
  419.             <left>467</left>
  420.             <top>0</top>
  421.             <right>512</right>
  422.             <bottom>50</bottom>
  423.         </rect>
  424.         <style>transparent</style>
  425.         <showName> <true /> </showName>
  426.         <highlight> <false /> </highlight>
  427.         <autoHighlight> <false /> </autoHighlight>
  428.         <sharedHighlight> <true /> </sharedHighlight>
  429.         <family>0</family>
  430.         <titleWidth>0</titleWidth>
  431.         <icon>1020</icon>
  432.         <textAlign>center</textAlign>
  433.         <font>Chicago</font>
  434.         <textSize>12</textSize>
  435.         <textStyle>plain</textStyle>
  436.         <name>Help</name>
  437.         <script>on mouseUp
  438. go card "help card"
  439. end mouseUp</script>
  440.     </part>
  441.     <part>
  442.         <id>20</id>
  443.         <type>field</type>
  444.         <visible> <true /> </visible>
  445.         <dontWrap> <false /> </dontWrap>
  446.         <dontSearch> <false /> </dontSearch>
  447.         <sharedText> <false /> </sharedText>
  448.         <fixedLineHeight> <false /> </fixedLineHeight>
  449.         <autoTab> <false /> </autoTab>
  450.         <lockText> <true /> </lockText>
  451.         <rect>
  452.             <left>324</left>
  453.             <top>66</top>
  454.             <right>512</right>
  455.             <bottom>120</bottom>
  456.         </rect>
  457.         <style>scrolling</style>
  458.         <autoSelect> <false /> </autoSelect>
  459.         <showLines> <false /> </showLines>
  460.         <wideMargins> <false /> </wideMargins>
  461.         <multipleLines> <false /> </multipleLines>
  462.         <reservedFamily> 0 </reservedFamily>
  463.         <titleWidth>0</titleWidth>
  464.         <icon>0</icon>
  465.         <textAlign>left</textAlign>
  466.         <font>Geneva</font>
  467.         <textSize>9</textSize>
  468.         <textStyle>plain</textStyle>
  469.         <textHeight>12</textHeight>
  470.         <name>Status</name>
  471.         <script></script>
  472.     </part>
  473.     <part>
  474.         <id>21</id>
  475.         <type>field</type>
  476.         <visible> <true /> </visible>
  477.         <dontWrap> <false /> </dontWrap>
  478.         <dontSearch> <false /> </dontSearch>
  479.         <sharedText> <false /> </sharedText>
  480.         <fixedLineHeight> <false /> </fixedLineHeight>
  481.         <autoTab> <false /> </autoTab>
  482.         <lockText> <false /> </lockText>
  483.         <rect>
  484.             <left>408</left>
  485.             <top>50</top>
  486.             <right>512</right>
  487.             <bottom>67</bottom>
  488.         </rect>
  489.         <style>rectangle</style>
  490.         <autoSelect> <false /> </autoSelect>
  491.         <showLines> <false /> </showLines>
  492.         <wideMargins> <false /> </wideMargins>
  493.         <multipleLines> <false /> </multipleLines>
  494.         <reservedFamily> 0 </reservedFamily>
  495.         <titleWidth>0</titleWidth>
  496.         <icon>0</icon>
  497.         <textAlign>left</textAlign>
  498.         <font>Geneva</font>
  499.         <textSize>12</textSize>
  500.         <textStyle>plain</textStyle>
  501.         <textHeight>16</textHeight>
  502.         <name></name>
  503.         <script></script>
  504.     </part>
  505.     <part>
  506.         <id>24</id>
  507.         <type>field</type>
  508.         <visible> <true /> </visible>
  509.         <dontWrap> <false /> </dontWrap>
  510.         <dontSearch> <false /> </dontSearch>
  511.         <sharedText> <false /> </sharedText>
  512.         <fixedLineHeight> <false /> </fixedLineHeight>
  513.         <autoTab> <false /> </autoTab>
  514.         <lockText> <false /> </lockText>
  515.         <rect>
  516.             <left>367</left>
  517.             <top>248</top>
  518.             <right>512</right>
  519.             <bottom>268</bottom>
  520.         </rect>
  521.         <style>rectangle</style>
  522.         <autoSelect> <false /> </autoSelect>
  523.         <showLines> <false /> </showLines>
  524.         <wideMargins> <false /> </wideMargins>
  525.         <multipleLines> <false /> </multipleLines>
  526.         <reservedFamily> 0 </reservedFamily>
  527.         <titleWidth>0</titleWidth>
  528.         <icon>0</icon>
  529.         <textAlign>left</textAlign>
  530.         <font>Geneva</font>
  531.         <textSize>12</textSize>
  532.         <textStyle>plain</textStyle>
  533.         <textHeight>16</textHeight>
  534.         <name>Ralph</name>
  535.         <script></script>
  536.     </part>
  537.     <part>
  538.         <id>25</id>
  539.         <type>field</type>
  540.         <visible> <true /> </visible>
  541.         <dontWrap> <false /> </dontWrap>
  542.         <dontSearch> <false /> </dontSearch>
  543.         <sharedText> <false /> </sharedText>
  544.         <fixedLineHeight> <false /> </fixedLineHeight>
  545.         <autoTab> <false /> </autoTab>
  546.         <lockText> <true /> </lockText>
  547.         <rect>
  548.             <left>367</left>
  549.             <top>234</top>
  550.             <right>473</right>
  551.             <bottom>249</bottom>
  552.         </rect>
  553.         <style>rectangle</style>
  554.         <autoSelect> <false /> </autoSelect>
  555.         <showLines> <false /> </showLines>
  556.         <wideMargins> <false /> </wideMargins>
  557.         <multipleLines> <false /> </multipleLines>
  558.         <reservedFamily> 0 </reservedFamily>
  559.         <titleWidth>0</titleWidth>
  560.         <icon>0</icon>
  561.         <textAlign>left</textAlign>
  562.         <font>Geneva</font>
  563.         <textSize>12</textSize>
  564.         <textStyle>plain</textStyle>
  565.         <textHeight>16</textHeight>
  566.         <name>testeroni</name>
  567.         <script></script>
  568.     </part>
  569.     <content>
  570.         <layer>card</layer>
  571.         <id>10</id>
  572.         <text>XCMD Arguments:</text>
  573.     </content>
  574.     <content>
  575.         <layer>card</layer>
  576.         <id>9</id>
  577.         <text>666, Zing, Yowza
  578. </text>
  579.     </content>
  580.     <content>
  581.         <layer>background</layer>
  582.         <id>1</id>
  583.         <text>0</text>
  584.     </content>
  585.     <content>
  586.         <layer>card</layer>
  587.         <id>7</id>
  588.         <text>1800
  589. Umm
  590. HyperCard</text>
  591.     </content>
  592.     <content>
  593.         <layer>card</layer>
  594.         <id>6</id>
  595.         <text>61
  596. Umm
  597. THINK C Debugger</text>
  598.     </content>
  599.     <content>
  600.         <layer>card</layer>
  601.         <id>21</id>
  602.         <text>Status Window:</text>
  603.     </content>
  604.     <content>
  605.         <layer>card</layer>
  606.         <id>20</id>
  607.         <text>You can hit the 'Call XCMD Source' button safely if you have your XCMD project running in THINK C.</text>
  608.     </content>
  609.     <content>
  610.         <layer>card</layer>
  611.         <id>25</id>
  612.         <text>Ralph: Test Fld</text>
  613.     </content>
  614.     <name>main</name>
  615.     <script>on idle
  616. if not (the suspended) then
  617. if (bg fld pipeaddr is not "") and (bg fld pipeaddr is not 0) then
  618. get checkPBPlus(bg fld pipeaddr, nil)
  619. put it into PBPlusChecker
  620. if PBPlusChecker is "cb" then
  621. -- Set the buttons up for CallBacks
  622. set the visible of cd btn "call xcmd source" to false
  623. set the visible of cd btn "make xcmd callback" to true
  624. put "Make your Callback."  into cd fld status
  625. get checkPBPlus(bg fld pipeaddr, Check)
  626. end if
  627. if PBPlusChecker is "rv" then
  628. -- Set the buttons up for return value
  629. set the visible of cd btn "get return value from xcmd" to true
  630. set the visible of cd btn "make xcmd callback" to false
  631. set the visible of cd btn "go back to c" to false
  632. put "Your XCMD has ended.  Hit 'Get Return Value from XCMD'."  into cd fld status
  633. end if
  634.  
  635. if PBPlusChecker is "nada" then
  636. -- Screw up
  637. send mouseup to cd btn "Reset, If Crash Occurs"
  638. beep
  639. answer "You Need to Start Your THINK C Project Running First"
  640. end if
  641. end if
  642. -- End of there actually being something in PBPlus
  643. -- Now if there is nothing in PBPlus
  644. if (bg fld pipeaddr is "") or (bg fld pipeaddr is 0) then
  645. set the visible of cd btn "call xcmd source" to true
  646. put "You can hit the 'Call XCMD Source' button safely if you have your XCMD project running in THINK C."  into cd fld status
  647. set the visible of cd btn "make xcmd callback" to false
  648. set the visible of cd btn "go back to c" to false
  649. set the visible of cd btn "get return value from xcmd" to false
  650. end if
  651. end if
  652. pass idle
  653. end idle
  654.  
  655. </script>
  656. </card>
  657.  
  658.  
  659. card_2205.xml
  660. <?xml version="1.0" encoding="utf-8" ?>
  661. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  662. <card>
  663.     <id>2205</id>
  664.     <filler1>0</filler1>
  665.     <cantDelete> <false /> </cantDelete>
  666.     <showPict> <true /> </showPict>
  667.     <dontSearch> <false /> </dontSearch>
  668.     <owner>2637</owner>
  669.     <link rel="stylesheet" type="text/css" href="stylesheet_3136.css" />
  670.     <part>
  671.         <id>1</id>
  672.         <type>field</type>
  673.         <visible> <true /> </visible>
  674.         <dontWrap> <false /> </dontWrap>
  675.         <dontSearch> <false /> </dontSearch>
  676.         <sharedText> <false /> </sharedText>
  677.         <fixedLineHeight> <false /> </fixedLineHeight>
  678.         <autoTab> <false /> </autoTab>
  679.         <lockText> <false /> </lockText>
  680.         <rect>
  681.             <left>0</left>
  682.             <top>0</top>
  683.             <right>421</right>
  684.             <bottom>328</bottom>
  685.         </rect>
  686.         <style>scrolling</style>
  687.         <autoSelect> <false /> </autoSelect>
  688.         <showLines> <false /> </showLines>
  689.         <wideMargins> <false /> </wideMargins>
  690.         <multipleLines> <false /> </multipleLines>
  691.         <reservedFamily> 0 </reservedFamily>
  692.         <titleWidth>0</titleWidth>
  693.         <icon>0</icon>
  694.         <textAlign>left</textAlign>
  695.         <font>Geneva</font>
  696.         <textSize>12</textSize>
  697.         <textStyle>plain</textStyle>
  698.         <textHeight>16</textHeight>
  699.         <name></name>
  700.         <script></script>
  701.     </part>
  702.     <part>
  703.         <id>2</id>
  704.         <type>button</type>
  705.         <visible> <true /> </visible>
  706.         <reserved5> 0 </reserved5>
  707.         <reserved4> 0 </reserved4>
  708.         <reserved3> 0 </reserved3>
  709.         <reserved2> 0 </reserved2>
  710.         <reserved1> 0 </reserved1>
  711.         <enabled> <true /> </enabled>
  712.         <rect>
  713.             <left>422</left>
  714.             <top>0</top>
  715.             <right>512</right>
  716.             <bottom>27</bottom>
  717.         </rect>
  718.         <style>roundrect</style>
  719.         <showName> <true /> </showName>
  720.         <highlight> <false /> </highlight>
  721.         <autoHighlight> <false /> </autoHighlight>
  722.         <sharedHighlight> <true /> </sharedHighlight>
  723.         <family>0</family>
  724.         <titleWidth>0</titleWidth>
  725.         <icon>0</icon>
  726.         <textAlign>center</textAlign>
  727.         <font>Chicago</font>
  728.         <textSize>12</textSize>
  729.         <textStyle>plain</textStyle>
  730.         <name>HyperXBug</name>
  731.         <script>on mouseUp
  732. go card main
  733. end mouseUp</script>
  734.     </part>
  735.     <content>
  736.         <layer>card</layer>
  737.         <id>1</id>
  738.         <text>Welcome to the HyperXBug Demo. This program represents a giant leap forward in computer science.  Well, it makes debugging your XCMDs a lot easier anyway.  This demo version of HyperXBug only supports two Callbacks and those are a bit crippled, but it does show how HyperXBug allows one to debug XCMDs at the source level.  To order the full version of HyperXBug for HyperCard or SuperCard (Please specify which) send a check for $150 to:
  739. RanTech
  740. 4840 Clairemont Mesa Bl. #14
  741. San Deigo, CA 92117
  742. or E-Mail a visa number to:
  743. CompuServe: 73027,3370
  744. America Online or AppleLink: HyperXBug.  
  745.  
  746. System Requirements:  at least 4 meg of RAM and System 6.0.3 or higher including System 7.  HyperCard 2.0 and THINK C 4.0.  
  747.  
  748. There are a few basic things to know about HyperXBug.  The first thing you must do is Install HyperXBug.  Click on the Install button in the upper left of the first screen.  This will prompt you to locate HyperCard and the Think C Debugger.  Remember to Choose the "THINK C Debugger", not Think C.  
  749.  
  750. First, 'Make' the Bugging.proj and DoneBugging.proj in the libs folder.  
  751.  
  752. Next, open HyperXBugDemo.proj in Think C.  Make sure the project type is "Application" when debugging.  HyperXBugDemo is a working XFCN that will show how to step through your C source using HyperXBug.  
  753.  
  754. Make sure when debugging that the #define Xdebugging statement is 1.  You will set it to 0 when you are done debugging and want to compile.  This is important.  
  755.  
  756. Once HyperXBugDemo.proj is up in Think C, hit command-R (this will start the Think C Debugger as usual).  You are now ready to start debugging your XCMD.  
  757.  
  758. Now, go back to HyperCard through the Finder.  
  759.  
  760. Any arguments that your XCMD needs must be typed into the 'XCMD Argument' field.  The name of your XCMD is irrelevant at this point; you will be debugging whatever XCMD is in THINK C.  
  761.  
  762. Hit the "Call XCMD Source" button.  This will send you over to the C debugger where you are ready to step through your code.  You can simply hit Go if you want.  However, you will probably want to set a breakpoint after the boilerplate SetUpHyperXBug() code.  The SetUpHyperXBug() code must be in every HyperXBug project as it sets up the necessary HyperXBug data structures . There is no need to SetUpA4 or any of the usual code resource setups, HyperXBug does it for you.  Now if you hit Go, you'll end up back in HyperCard because you encountered a Callback.  HyperCard will require you to make the Callback before you can go back to C.  Make the Callback (i.e. hit the Make Callback button).  After making the Callback you have the option of making the same Callback again or going back to C.  Go back to C and you can step through more of your code.  When the XCMD is done HyperXBug will give you the return value and then will release its contact with THINK C.  
  763.  
  764. That's it!  You now have the ability to step through your C source code setting breakpoints along the way.  Any Callbacks will put you back in HyperCard.
  765.  
  766. To compile your XCMD you must do a few simple things.  Remove the Bugging.proj from the project window and replace it with the DoneBugging.proj from the HyperXBug libs folder.  Now change the project type from "Application" to "Code Resource" and fill in the appropriate blanks as outlined in the Think C manual, pg 85ish.  You MUST CHECK the 'MultiSegment' box.  Next, set the #define Xdebugging to 0.  Recompile the project as an XCMD and it's ready to install in whatever project you want.  If it worked in the debugger it will work in real life.  
  767.  
  768. There are a few caveats: 
  769. 1) If you are using ROM calls from managers that are usually inited by HyperCard, you must init these yourself during debugging and then REMOVE them when you compile to an xcmd. eg. InitWindows().  
  770.  
  771. 2) You must check multi-seg in the project type window even if it's only one segment because HyperXBug uses objects.  
  772.  
  773. 3) You will notice that the usual calling convention of Callbacks is slightly different.  This is because CXBug(What HyperXBug is based on), is an object class and Callbacks are messages to thePipe, an object of class CXBug.  You do not pass the paramPtr in your callbacks because the paramPtr is an instance variable of thePipe.  Look at the examples of Callbacks in the test project and you will see that it's a simple difference.  You can look at the instance variables in CXBug.h to see how to access some of them.  You will sometimes want to access the paramPtr directly to get at things like the ReturnValue.  
  774.  
  775. 4) HyperXBug currently supports only the 1.2.5 callbacks, although HyperXBug works in HyperCard 2.1.  I am currently working on HyperCard 2.1 XWindow callbacks.  It supports all SuperCard Callbacks.  
  776.  
  777. Any Problems?  Please feel free to give me a call or E-Mail me at 619-292-5834 H/W, Compuserve: 73027,3370.  America Online: HyperXBug.  AppleLink: HyperXBug.  I hope you will find this program useful.  I expect you will.  Thanks, Dave Holden.  </text>
  778.     </content>
  779.     <name>Help Card</name>
  780.     <script></script>
  781. </card>
  782.  
  783.  
  784.